package knowledge.ct.model;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

import knowledge.content.model.KNContent;
import knowledge.tag.model.Tag;

import com.googlecode.jtiger.core.model.BaseIdModel;

@SuppressWarnings("serial")
@Entity
@Table(name = "KN_CONTENT_TAGS")
public class ContentTag extends BaseIdModel {
	private KNContent content;
	private Tag tag;
	private Integer priorityLevel;

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "CONTENT_ID")
	public KNContent getContent() {
		return content;
	}

	public void setContent(KNContent content) {
		this.content = content;
	}

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "TAG_ID")
	public Tag getTag() {
		return tag;
	}

	public void setTag(Tag tag) {
		this.tag = tag;
	}

	public Integer getPriorityLevel() {
		return priorityLevel;
	}

	public void setPriorityLevel(Integer priorityLevel) {
		this.priorityLevel = priorityLevel;
	}
}
